package com.ruoyi.system.service.impl;

import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.system.mapper.workerPositionMapper;
import com.ruoyi.system.domain.WorkerPosition;
import com.ruoyi.system.service.iWorkerPositionService;

/**
 * 员工-职位Service业务层处理
 *
 * @author ruoyi
 * @date 2024-05-13
 */
@Service
public class workerPositionServiceImpl implements iWorkerPositionService
{
    @Autowired
    private workerPositionMapper WorkerPositionMapper;

    /**
     * 查询员工-职位
     *
     * @param positionId 员工-职位主键
     * @return 员工-职位
     */
    @Override
    public WorkerPosition selectWorkerPositionByPositionId(Long positionId)
    {
        return WorkerPositionMapper.selectWorkerPositionByPositionId(positionId);
    }

    /**
     * 查询员工-职位列表
     *
     * @param WorkerPosition 员工-职位
     * @return 员工-职位
     */
    @Override
    public List<WorkerPosition> selectWorkerPositionList(WorkerPosition WorkerPosition)
    {
        return WorkerPositionMapper.selectWorkerPositionList(WorkerPosition);
    }

    /**
     * 新增员工-职位
     *
     * @param WorkerPosition 员工-职位
     * @return 结果
     */
    @Override
    public int insertWorkerPosition(WorkerPosition WorkerPosition)
    {
        return WorkerPositionMapper.insertWorkerPosition(WorkerPosition);
    }

    /**
     * 修改员工-职位
     *
     * @param WorkerPosition 员工-职位
     * @return 结果
     */
    @Override
    public int updateWorkerPosition(WorkerPosition WorkerPosition)
    {
        return WorkerPositionMapper.updateWorkerPosition(WorkerPosition);
    }

    /**
     * 批量删除员工-职位
     *
     * @param positionIds 需要删除的员工-职位主键
     * @return 结果
     */
    @Override
    public int deleteWorkerPositionByPositionIds(Long[] positionIds)
    {
        return WorkerPositionMapper.deleteWorkerPositionByPositionIds(positionIds);
    }

    /**
     * 删除员工-职位信息
     *
     * @param positionId 员工-职位主键
     * @return 结果
     */
    @Override
    public int deleteWorkerPositionByPositionId(Long positionId)
    {
        return WorkerPositionMapper.deleteWorkerPositionByPositionId(positionId);
    }
}
